package com.qqtech.qquan.circle.dao;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.qqtech.core.frame.dao.BaseDaoImpl;
import com.qqtech.qquan.circle.model.*;

@Repository
public class CircleMemberGradeDaoImpl extends BaseDaoImpl<CircleMemberGrade> implements CircleMemberGradeDao {
	public static final Logger log = LoggerFactory.getLogger(CircleMemberGradeDaoImpl.class);

	@Override
	public int updateGradeUsed(CircleMemberGrade memberGrade) {
		if(memberGrade==null){
			return 0;
		}
		if(memberGrade.getIsUsed()==null){
			return 0;
		}
		if(memberGrade.getCircleId()==null){
			return 0;
		}
		if(memberGrade.getGradeCode()==null){
			return 0;
		}
		return sqlSessionTemplate.update(getSqlName("updateGradeUsed"), memberGrade);
	}
	
}
